// 材料接收路由模块
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const MATERIAL_RECEIPT: AppRouteRecordRaw = {
  path: '/material-receipt',
  name: '物料接收',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.material-receipt',
    icon: 'icon-code-sandbox ',
    roles: ['*'],
    requiresAuth: true,
    ignoreCache: false,
    order: 1,
  },
  children: [
    // 扫码移交
    {
      path: '/scanning-handover',
      name: '扫码移交',
      component: () =>
        import('@/views/material-receipt/list/scanning-handover/index.vue'),
      meta: {
        locale: 'menu.scanningHandover',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 协调单管理
    {
      path: '/coordinate-management',
      name: '协调单管理',
      component: () =>
        import('@/views/material-receipt/list/coordinate-management/index.vue'),
      meta: {
        locale: 'menu.coordinateManagement',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },

    // 扫码退回
    {
      path: '/scanning-return',
      name: '扫码退回',
      component: () =>
        import('@/views/material-receipt/list/scanning-return/index.vue'),
      meta: {
        locale: 'menu.scanningReturn',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 零件接收
    {
      path: '/part-receive',
      name: '零件接收',
      component: () =>
        import('@/views/material-receipt/list/part-receive/index.vue'),
      meta: {
        locale: 'menu.partReceive',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 成品接收
    {
      path: '/finished-receive',
      name: '成品接收',
      component: () =>
        import('@/views/material-receipt/list/finished-receive/index.vue'),
      meta: {
        locale: 'menu.finishedReceive',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 标件接收
    {
      path: '/standard-receive',
      name: '标件接收',
      component: () =>
        import('@/views/material-receipt/list/standard-receive/index.vue'),
      meta: {
        locale: 'menu.standardReceive',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 退库接收
    {
      path: '/return-receive',
      name: '退库接收',
      component: () =>
        import('@/views/material-receipt/list/return-receive/index.vue'),
      meta: {
        locale: 'menu.returnReceive',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 物料入库
    {
      path: '/material-warehousing',
      name: '物料入库',
      component: () =>
        import('@/views/material-receipt/list/material-warehousing/index.vue'),
      meta: {
        locale: 'menu.materialWarehousing',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 零件退货
    {
      path: '/part-return',
      name: '零件退货',
      component: () =>
        import('@/views/material-receipt/list/part-return/index.vue'),
      meta: {
        locale: 'menu.partReturn',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 成品退货
    {
      path: '/finish-return',
      name: '成品退货',
      component: () =>
        import('@/views/material-receipt/list/finish-return/index.vue'),
      meta: {
        locale: 'menu.finishReturn',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 标准件退货
    {
      path: '/standard-return',
      name: '标准件退货',
      component: () =>
        import('@/views/material-receipt/list/standard-return/index.vue'),
      meta: {
        locale: 'menu.standardReturn',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // 已叫箱料单
    {
      path: '/received-delivery-plan',
      name: '已叫箱料单',
      component: () =>
        import(
          '@/views/material-receipt/list/received-delivery-plan/index.vue'
        ),
      meta: {
        locale: 'menu.receivedDeliveryPlan',
        requiresAuth: true,
        ignoreCache: false,
        roles: ['*'],
      },
    },
    // {
    //   path: '/secondary-matching',
    //   name: '二次配套',
    //   component: () =>
    //     import(
    //       '@/views/material-receipt/list/secondary-matching/index.vue'
    //     ),
    //   meta: {
    //     locale: 'menu.secondaryMatching',
    //     requiresAuth: true,
    //     ignoreCache: false,
    //     roles: ['*'],
    //   },
    // },
  ],
};

export default MATERIAL_RECEIPT;
